package org.oppoweb.emf.ecore
{
    /**
     * An API for delegating reflective access to settings. 
     */
    public interface ESFInternalSettingDelegate
    {
      /**
       * Returns a setting that can be used to access the owner's feature.
       * @param owner the owner of the feature.
       * @param settings the owner's array of cached values.
       * @param dynamicFeatureID the feature's index in the owner's cached dynamic values.
       * @return a setting that can be used to access the owner's feature.
       * @see InternalEObject#eSetting(EStructuralFeature)
       */
      function dynamicSetting(owner:InternalEObject, settings:DynamicValueHolder, dynamicFeatureID:int):Setting;

      /**
       * Returns the value of the feature of this owner.
       * @param owner the owner of the feature.
       * @param settings the owner's array of cached values.
       * @param dynamicFeatureID the feature's index in the owner's cached dynamic values.
       * @param resolve whether to resolve.
       * @param coreType return the core EMF object if value is a non-EMF wrapper/view.
       * @return the value of the feature of this owner.
       * @see EObject#eGet(EStructuralFeature, boolean)
       */
      function dynamicGet(owner:InternalEObject, settings:DynamicValueHolder, dynamicFeatureID:int, resolve:Boolean, coreType:Boolean):Object;

      /**
       * Sets the value of the given feature of the owner to the new value.
       * @param owner the owner of the feature.
       * @param settings the owner's array of cached values.
       * @param dynamicFeatureID the feature's index in the owner's cached dynamic values.
       * @param newValue the new value for the feature.
       * @see EObject#eSet(EStructuralFeature, Object)
       */
      function dynamicSet(owner:InternalEObject, settings:DynamicValueHolder, dynamicFeatureID:int, newValue:Object):void;

      /**
       * Returns whether the feature of the owner is considered to be set.
       * @param owner the owner of the feature.
       * @param settings the owner's array of cached values.
       * @param dynamicFeatureID the feature's index in the owner's cached dynamic values.
       * @return whether the feature of the owner is considered to be set.
       * @see EObject#eIsSet(EStructuralFeature)
       */
      function dynamicIsSet(owner:InternalEObject, settings:DynamicValueHolder, dynamicFeatureID:int):Boolean;

      /**
       * Unsets the value of the given feature of the owner.
       * @param owner the owner of the feature.
       * @param settings the owner's array of cached values.
       * @param dynamicFeatureID the feature's index in the owner's cached dynamic values.
       * @see EObject#eUnset(EStructuralFeature)
       */
      function dynamicUnset(owner:InternalEObject, settings:DynamicValueHolder, dynamicFeatureID:int):void;

      /**
       * Adds the object at the other end of a bidirectional reference to the appropriate feature
       * and returns accumulated notifications.
       * @param owner the owner of the feature.
       * @param settings the owner's array of cached values.
       * @param dynamicFeatureID the feature's index in the owner's cached dynamic values.
       * @param otherEnd the object to inverse add.
       * @param notifications the incoming accumulated notifications.
       * @return accumulated notifications.
       * @see InternalEObject#eInverseAdd
       */
      function dynamicInverseAdd(owner:InternalEObject, settings:DynamicValueHolder, dynamicFeatureID:int, 
        otherEnd:InternalEObject, notifications:NotificationChain):NotificationChain;

      /**
       * Removes the object at the other end of a bidirectional reference from the appropriate feature
       * and returns accumulated notifications.
       * @param owner the owner of the feature.
       * @param settings the owner's array of cached values.
       * @param dynamicFeatureID the feature's index in the owner's cached dynamic values.
       * @param otherEnd the object to inverse remove.
       * @param notifications the incoming accumulated notifications.
       * @return accumulated notifications.
       * @see InternalEObject#eInverseRemove
       */
      function dynamicInverseRemove(owner:InternalEObject, settings:DynamicValueHolder, dynamicFeatureID:int, 
         otherEnd:InternalEObject, notifications:NotificationChain):NotificationChain;
    }

}